<script setup>
import { ref } from 'vue'
import axios from 'axios'

const mapData = './static/config/config.json'

const mapConfig = ref({})
const isShow = ref(false)

const fetchConfig = () => {
  axios.get(mapData).then(res => {
    mapConfig.value = res.data
    isShow.value = true
  })
}

fetchConfig()
</script>

<template>
  <div class="map-warp">
    <d-map
      v-if="isShow"
      :config="mapConfig"
    >
      <div>
        <a-button>fdsdafasd</a-button>
      </div>
      <div>fsdafas</div>
    </d-map>
  </div>
</template>

<style scoped>
.map-warp {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
</style>
